﻿using System;
using System.Data;

namespace Smatime.Web.Models
{
    public class ViewStaffByCompany : BaseEntity
    {
        public long CompanyId { get; set; }
        public string Name { get; set; }
        public string NameKana { get; set; }
        public int WorkingStatus { get; set; }
        public int ContractType { get; set; }
        public int WorkVisa { get; set; }
        public DateTime? VisaExperationDate { get; set; }
        public string StoreNames { get; set; }


        public override BaseEntity FromDataRow(DataRow row)
        {
            Id = (long) row["Id"];
            CompanyId = (long) row["CompanyId"];
            Name = row["Name"].ToString();
            NameKana = row["NameKana"].ToString();
            WorkingStatus = (int) row["WorkingStatus"];
            ContractType = (int) row["ContractType"];
            WorkVisa = (int) row["WorkVisa"];
            VisaExperationDate = row["VisaExperationDate"].ToDateTime();
            StoreNames = row["StoreNames"].ToString();

            return base.FromDataRow(row);
        }

        public override void ToDataRow(DataRow row)
        {
            base.ToDataRow(row);
        }
    }
}